<div class="actions">
	<ul>
		<li><?php echo $html->link(__('Nuevo Usuario', true), array('action'=>'add')); ?></li>
	</ul>
</div>
<div class="users index">
<h2><?php __('Participantes');?></h2>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Pagina %page% of %pages%, Mostrando %current% registro de %count% totales, primer registro %start%, termina en %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0" class="tableIndex">
<tr>
	
	<th><?php echo $paginator->sort('WCG-ID');?></th>
	<th><?php echo $paginator->sort('Nombre');?></th>
	<th><?php echo $paginator->sort('Usuario');?></th>
	<th><?php echo $paginator->sort('E-Mail');?></th>
	<th><?php echo $paginator->sort('Estatus');?></th>
	<!--<th><?php echo $paginator->sort('Creado');?></th>-->
	<!--<th><?php echo $paginator->sort('Modificado');?></th>-->
	<th class="actions"><?php __('Acciones');?></th>
</tr>
<?php
$i = 0;
foreach ($users as $user):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<?php //if($user['User']['group_id']!=1):?>
	<tr<?php echo $class;?>>
		<td>
			<?php echo 'WCGVE'.str_pad($user['User']['wcgid'], 4, "0", STR_PAD_LEFT);// ?>
		</td>
		<td>
			<?php echo trim($user['User']['name'].' '.$user['User']['lastname']); ?>
		</td>
		<td>
			<?php echo $user['User']['username']; ?>
		</td>
		<td>
			<?php echo $user['User']['email']; ?>
		</td>
		<?php
			$status = null;
			switch ($user['User']['status']) {
				case 'INA':
					$status = 'Inactivo';
				break;
				case 'ACT':
				$status = 'Activo';
				break;
				case 'DES':
					$status = 'Desactivado';
				break;
			}
		?>
		<td>
			<?php echo $status; ?>
		</td>
		<!--<td>
			<?php echo $user['User']['created']; ?>
		</td>-->
		<!--<td>
			<?php echo $user['User']['modified']; ?>
		</td>-->
		<td class="actions">
			<?php //echo $html->link(__('View', true), array('action'=>'view', $user['User']['id'])); ?>
			<?php echo $html->link(__('Torneos', true), array('action'=>'admin', $user['User']['id'])); ?>
			<?php echo $html->link(__('Pagos', true), array('controller'=>'users','action'=>'depositusercheck', $user['User']['id'], $this->data['Event']['id']));?>
			<?php //echo $html->link(__('Main', true), array('action'=>'main', $user['User']['id'])); ?>
			<?php echo $html->link(__('Editar', true), array('action'=>'edit', $user['User']['id'])); ?>
			<?php echo $html->link(__('Borrar', true), array('action'=>'delete', $user['User']['id']), null, sprintf(__('Esta seguro en borrar el registro: %s %s?', true), $user['User']['name'], $user['User']['lastname'])); ?>
		</td>
	</tr>
	<?php //endif;?>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('Anterior', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('Siguiente', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
